<!doctype html>
<html lang="zh-cmn-Hans">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, shrink-to-fit=no"/>
    <meta name="renderer" content="webkit"/>
    <meta name="force-rendering" content="webkit"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
    <!-- MDUI CSS -->
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/mdui@1.0.2/dist/css/mdui.min.css"/>
 <style>
.k1 {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
}

    </style>
    <title>Ourshare</title>
  </head>
  <body class="mdui-drawer-body-left mdui-theme-primary-indigo mdui-text-color-white" >
<div class="mdui-toolbar mdui-color-theme mdui-text-color-white">
<span class="mdui-btn mdui-btn-icon mdui-indigo" mdui-drawer="{target: '#drawer', swipe: true}">
      <i class="mdui-icon material-icons">menu</i>
    </span>
  <span class="mdui-typo-title">Ourshare后台管理中心</span>
  <div class="mdui-toolbar-spacer"></div>
</div>

<div class="mdui-drawer mdui-color-white" id="drawer">
    <ul class="mdui-list">
      <li class="mdui-list-item mdui-ripple ">
        <i class="mdui-list-item-icon mdui-icon material-icons">&#xe88a;</i>
       <div class="mdui-list-item-content  "> <a href="./index.php">首页</a></div>
      </li>
      <li class="mdui-list-item mdui-ripple mdui-list-item-active">
        <i class="mdui-list-item-icon mdui-icon material-icons">&#xe7fb;</i>
        <div class="mdui-list-item-content"><a href="./user.php">修改用户</a></div>
      </li>
      <li class="mdui-list-item mdui-ripple">
        <i class="mdui-list-item-icon mdui-icon material-icons">&#xe2c4;</i>
        <div class="mdui-list-item-content"><a href="./clean.php">清空文件</a></div>
      </li>
      <li class="mdui-list-item mdui-ripple">
        <i class="mdui-list-item-icon mdui-icon material-icons">&#xe2c6;</i>
        <div class="mdui-list-item-content"><a href="./gonggao.php">公告设置</a></div>
      </li>
      <li class="mdui-list-item mdui-ripple">
        <i class="mdui-list-item-icon mdui-icon material-icons">&#xe0da;</i>
        <div class="mdui-list-item-content"><a href="./about">关于</a></div>
      </li>
    </ul>
  </div>

  <div class="mdui-container k1"  style="margin:auto;text-align:center">
<div class=" mdui-text-color-theme mdui-typo-display-3">用户信息列表</div>
</br></br></br>
<div class="mdui-text-color-black mdui-typo ">
<table align='center' style="margin:auto;text-align:center" class='table table-bordered table-hover' id='tb'><tr>
    <th>用户名</th>
    <th>密码</th>
    <th>VIP等级</th>
  </tr>
<?php
header ( "Content-type:text/html;charset=utf-8" );

//在表格中显示表的数据，常用方式
    function ShowTable($table_name){
$json_string = file_get_contents('../install_sql.json');
$dataxxx = json_decode($json_string, true);
        $conn=mysqli_connect($dataxxx[1],$dataxxx[2],$dataxxx[3]);
        mysqli_select_db($conn,$dataxxx[4]);
        mysqli_query("set names utf8");
        if(!$conn){
            echo "连接失败";
        }
error_reporting(0);
        $sql="select * from $table_name";
        $res=mysqli_query($conn,$sql);
        $rows=mysqli_affected_rows($conn);//获取行数
        $colums=mysqli_num_fields($res);//获取列数
         

for($i=0; $i < $colums; $i++){

            $field_name=mysqli_fetch_fields($res,$i);
            echo "<th>$field_name</th>";
        }
        echo "</tr>";

        while($row=mysqli_fetch_row($res)){

            echo "<tr>";

            for($i=0; $i<$colums; $i++){

                echo "<td>$row[$i]</td>";
            }

            echo "</tr>";

        }

        echo "</table>";
    }
error_reporting(0);
    ShowTable("OurShareUserName");
error_reporting(0);
?>	
<hr>	
<div class=" mdui-text-color-theme mdui-typo-display-3">修改用户信息</div>
<form method="post" action="../admin/rungai.php">
<div class="mdui-row">
<div class="mdui-col-xs-4 "> </div>
<div class="mdui-col-xs-4">
  <input class="mdui-textfield-input " type="text"  name="user"  placeholder="输入用户名">
			  </div>	  </div>
          
<input type="submit" value="修改" name="subl" class="mdui-btn mdui-btn-raised mdui-ripple mdui-color-theme ">
</form>
    </div>
  </div>

    <!-- MDUI JavaScript -->
    <script src="https://cdn.jsdelivr.net/npm/mdui@1.0.2/dist/js/mdui.min.js"></script>
  </body>
</html>

